n = int(input())
List = []
number = int
for i in range(n):
    List.append(list())
    for j in range(i+1):
        List[i].append(1)

for i in range(2, n):
   for j in range(1, i):
        try:
            List[i][j] = List[i - 1][j] + List[i -1][j - 1]
        except IndexError:
            continue
        
for i in range(len(List)):
    print(" ".join(map(str, List[i])))